package com.church.action;

import com.church.db.Announcement;
import com.church.services.AnnouncementServices;
import com.opensymphony.xwork2.ActionSupport;

public class GetAnnouncement extends ActionSupport {
	private AnnouncementServices announcementServices;
	private Announcement announcement;

	private int id;

	public AnnouncementServices getAnnouncementServices() {
		return announcementServices;
	}

	public void setAnnouncementServices(AnnouncementServices announcementServices) {
		this.announcementServices = announcementServices;
	}

	public Announcement getAnnouncement() {
		return announcement;
	}

	public void setAnnouncement(Announcement announcement) {
		this.announcement = announcement;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String execute() {
		announcement = announcementServices.getAnnouncementById(id);
		return "success";
	}
}
